﻿@model Solution.Business.Entities.FreeNew

@{
    ViewBag.Title = "Create";
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>


@if(Session["UserName"] != null)
{
using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend style="color:red;">Đăng tin</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Title, "Tiêu đề tin :")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Title)
            @Html.ValidationMessageFor(model => model.Title)
            <span style="color:red;">*</span>
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Details, "Nội dung tin :")
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.Details, new { @id = "ckeContent" })
            <script type="text/javascript">
                CKEDITOR.replace("ckeContent");
            </script>
            <span style="color:red;">*</span>
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.LgId, "Tình trạng pháp lý :")
        </div>
        <div class="editor-field">
            @Html.DropDownList("LgId", String.Empty)
            @Html.ValidationMessageFor(model => model.LgId)
            <span style="color:red;">*</span>
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.TrId, "Loại giao dịch :")
        </div>
        <div class="editor-field">
            @Html.DropDownList("TrId", String.Empty)
            @Html.ValidationMessageFor(model => model.TrId)
            <span style="color:red;">*</span>
        </div>

        <p>
            <input type="submit" value="Create" name="submitButton" id="submitButton" />
        </p>
    </fieldset>
}
}
    else
{
    <center><text><b style="color:red; font-family:Arial; font-size:12px;">Bạn hãy đăng nhập trước khi đăng tin</b></text></center>
}

